1
知識の限界を超えて:なぜ大規模言語モデルは外部データが必要なのか
AI011Lesson 6
00:00

知識の限界を超えて

大規模言語モデルは強力ですが、根本的な制約に直面しています: 知識の限界。信頼性のあるAIシステムを構築するには、静的学習データと動的かつ現実世界の情報とのギャップを埋める必要があります。

1. 知識の限界問題(何が起きているか)

LLMは、固定された終了日時(例:GPT-4の2021年9月までの限定)を持つ巨大だが静的なデータセットで訓練されています。そのため、モデルは訓練期間以降に作成された最新の出来事、ソフトウェアの更新、または個人データについて質問に答えられません。

2. 誤認と現実の違い(なぜ重要か)

未知のデータや限界後のデータについて尋ねられた場合、モデルはしばしば 誤認——提示された内容に納得させるために、ありそうに聞こえるが完全に虚偽の事実を創り出します。その解決策は 接地です:モデルが回答を生成する前に、外部の知識ベースからリアルタイムで検証可能な文脈を提供することです。

3. RAGとファインチューニングの比較(どのように対処するか)

  • ファインチューニング: モデルの内部重みを更新することは計算コストが高く、遅く、すぐに古くなってしまう静的な知識が生じます。
  • RAG (リトリーブ補強生成): 非常にコスト効率が高いです。リアルタイムで関連情報を取得し、プロンプトに組み込むことで、データの最新性を確保し、再トレーニングなしに知識ベースを簡単に更新できます。
企業内データの空白
LLMは、リトリーブパイプラインを通じて明示的に統合されない限り、企業内のマニュアル、財務報告書、機密文書にアクセスできません。
grounding_check.py
TERMINALbash — 80x24
> Ready. Click "Run" to execute.
>
Question 1
Why is Retrieval Augmented Generation (RAG) preferred over fine-tuning for updating an LLM's knowledge of daily news?
Fine-tuning prevents hallucinations entirely.
RAG is more cost-effective and provides up-to-date, verifiable context.
RAG permanently alters the model's internal weights.
Fine-tuning is faster to execute on a daily basis.
Question 2
What term describes an LLM's tendency to invent facts when it lacks information?
Grounding
Embedding
Hallucination
Tokenization
Challenge: Building a Support Bot
Apply RAG concepts to a real-world scenario.
You are building a support bot for a new product released today. The LLM you are using was trained two years ago.
Product Manual
Task 1
Identify the first step in the RAG pipeline to get the product manual into the system so the LLM can search it.
Solution:
Preprocessing (Cleaning and chunking the manual text into smaller, searchable segments before embedding).
Task 2
Define a "System Message" that forces the LLM to only use the provided documents and prevents hallucination.
Solution:
"Answer only using the provided context. If the answer is not in the context, state that you do not know."